package componentes;
import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JPanel;


public class PanelFondo extends JPanel {
	String Imagen;
	public PanelFondo(String img){
		this.Imagen=img;
	}

	public void paintComponent(Graphics g) {
		Dimension tamanio = getSize();
		ImageIcon fondo = new ImageIcon(getClass().getResource(Imagen));
		g.drawImage(fondo.getImage(), 0, 0, tamanio.width, tamanio.height, null);
		setOpaque(false);
		super.paintComponent(g);
		}

}

